def count(str):
    a= b= c =d =0
    if str!='':
        for i in str:
            if i.isdigit():
                a=a+1
            elif i.isalpha():
                b=b+1
            elif i.isspace():
                c=c+1
            else:
                d=d+1
                return False
str = input('请输入字符串：')
count(str)
if not count(str):
    print('测试成功')
elif count(str)==(2, 4, 1, 2):
    print('测试成功')
else:
    print('测试失败')


